<!--
 * @Author: Liz.Zheng
 * @Date: 2021-11-15 11:33:51
 * @LastEditTime: 2022-02-14 13:07:54
 * @LastEditors: Please set LastEditors
 * @Description: 项目、楼宇等图标
 * @Motto: Write the code. Change the world.
-->

<template>
  <div class="icon-bg" v-if="checked == true">
    <CheckOutlined />
  </div>
  <div class="icon-bg" v-else :style="boxStyle">
    <cu-icon :type="iconType"></cu-icon>
  </div>
</template>
<script>
import { defineComponent } from "vue";
import { CheckOutlined } from "@ant-design/icons-vue";

export default defineComponent({
  name: "BuildingIcon",
  components: { CheckOutlined },
  props: {
    boxStyle: {
      type: [Object, String],
      default: "",
    },
    iconType: {
      type: String,
      default: "",
    },
    // 展示选中样式
    checked: {
      type: Boolean,
      default: false,
    },
  },
  setup() {},
});
</script>

<style lang="less" scoped>
.icon-bg {
  background: @primary-color;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
}
</style>
